package com.zuxia.utils;

import lombok.Getter;
import lombok.ToString;

/**
 * @className: ResultCodeEnum
 * @Description: TODO
 * @version: v1.８.0
 * @author: Liuxin-G
 * @date: 2024/10/30 14:31
 */
@Getter
@ToString  //生成toString方法
public enum ResultCodeEnum {
    SUCCESS(true, 20000,"成功"),
    UNKNOWN_REASON(false, 20001, "未知错误"),

    BAD_SQL_GRAMMAR(false, 21001, "sql语法错误"),
    JSON_PARSE_ERROR(false, 21002, "json解析异常"),
    PARAM_ERROR(false, 21003, "参数不正确"),
    SMS_SEND_ERROR_BUSINESS_LIMIT_CONTROL(false, 28007, "短信发送过于频繁"),
    FILE_SIZE_IS_MAX(false,30002,"文件超出审计大小"),
    FILE_UPLOAD_ERROR(false,30003,"文件上传失败"),
    ORDERS_IS_NULL(false,30000,"没有查询到该比订单"),
    ORDERS_EROEE(false,30001,"订单支付失败"),
    ORDERS_STATUS_1(false,30000,"订单以支付，请勿重复支付"),
    ORDERS_SUBMIT_FALSE(false,30000,"订单已过期"),

    USER_NOT_FOUND(false,40001,"用户不存在"),
    USER_PASS_ERR0R(false,40002,"用户密码不正确"),
    USER_ADD_ERR0R(false,40003,"用户注册失败"),
    USER_STATUS_ERR0R(false,40004,"用户已禁用"),
    YZM_IS_NULL(false,40005,"验证码已过期，请重新获取验证码"),
    YZM_IS_FALSS(false,40006,"验证码错误"),
    YZM_TIME_OLD(false,40007,"操作频繁，请稍后再试"),
    PHONE_CODE_SEND_ERROR(false,40008,"验证码发送失败"),

    GROUP_ISS_ERROR(false,5001,"拼团失败"),
    GROUP_UPDATE_ERROR(false,5002,"修改审核状态失败"),

    SHOP_NULL(false,6001,"没有该商品信息"),
    SHOP_NUMBER_IS_EXCEED(false,6002,"库存不足"),
    SHOP_NUMBER_IS_UP(false,6003,"库存修改失败"),


    GROUP_NULL(false,7001,"没有该拼团信息"),
    GROUP_RELEASE_IS_FALSE(false,7002,"拼团发布失败"),
    GROUP_REVIEWER(false,7003,"审核未通过"),
    GROUP_IS_RELEASE_NOT(false,7004,"没有该拼团信息"),
    GROUP_IS_OVER(false,7005,"拼团已结束"),
    GROUP_IS_OVER1(false,7005,"抱歉，该拼团已超时，请参与其他拼团"),

    DUMP_IS_NULL(false,8001,"抱歉，没有找到取货点"),

    ORDER_GROUP_IS_NOTNULL(false,9000,"您已经参与此次拼团"),
    ORDER_GROUP_CANCEL(false,9001,"订单取消失败"),

    COMMISSION_IS_NULL(false,11001,"没有该佣金收支明细信息"),
    COMMISSION_IS_NOT_ENTRY(false,11002,"该佣金不是待入账状态"),

    GROUP_SEND_SHOP(false,10000,"拼团未成功，暂无法发货"),
    GROUP_SEND_SHOP_IS_ERROR(false,10001,"抱歉，暂无法发货"),
    GROUP_SEND_SHOP_FALSE(false,10002,"请勿重复发货"),

    SUBMIT_IS_NOTNULL(false,200000,"请勿重复支付"),
    SUBMIT_ORRDERS_IS_NULL(false,200001,"没有此订单"),
;
    private Boolean success;

    private Integer code;

    private String message;

    ResultCodeEnum(Boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}